Using PXI-Specific Attributes
This section contains information specific to the Windows product.
PXI-specific attributes are useful to determine device settings such as the PCI bus, device, and function numbers, the size of BARn memory, and so on. For example, to determine the size of BAR0 memory:
// Get the size of the BAR0 memory
ViAttr mapAttr = VI_ATTR_PXI_MEM_SIZE_BAR0;
ViUInt16 mapSpace = VI_PXI_BAR0_SPACE;
ViBusSize mapSize = 0;
status = viGetAttribute(vi, mapAttr, &mapSize);
PXI-Specific Attributes
Attribute |
Attribute Value |
Description |
---|---|---|
VI_ATTR_PXI_BUS_NUM |
0x3FFF0205UL |
PCI bus number of this device. |
VI_ATTR_PXI_DEV_NUM |
0x3FFF0201UL |
PCI device number of this device. |
VI_ATTR_PXI_FUNC_NUM |
0x3FFF0202UL |
PCI function number of the device. All devices have a function 0. Multifunction devices also support other function numbers. |
VI_ATTR_PXI_SLOTPATH | 0xBFFF0207UL | Slot path of this device. A PXI slot path is a sequence of values representing the PCI device number and function number of a PCI module and each parent PCI bridge that routes the module to the host PCI bridge. The string format of the attribute value is device1[.function1][,device2[.function2]][,...]. |
VI_ATTR_PXI_SLOT_LBUS_LEFT | 0x3FFF0208UL | Slot number or special feature connected to the local bus left lines of this device. |
VI_ATTR_PXI_SLOT_LBUS_RIGHT | 0x3FFF0209UL | Slot number or special feature connected to the local bus right lines of this device. |
VI_ATTR_PXI_TRIG_BUS | 0x3FFF020AUL | Number of the trigger bus connected to this device in the chassis. |
VI_ATTR_PXI_STAR_TRIG_BUS | 0x3FFF020BUL | Number of the star trigger bus connected to this device in the chassis. |
VI_ATTR_PXI_STAR_TRIG_LINE | 0x3FFF020CUL | PXI_STAR line connected to this device. |
VI_ATTR_PXI_MEM_TYPE_BARn | (0x3FFF0211UL + n) | Memory type (memory mapped or I/O mapped) used by the device in the specified BAR. |
VI_ATTR_PXI_MEM_BASE_BARn |
32-bit: (0x3FFF0221UL + n) 64-bit: (0x3FFF0228UL + n) |
Memory base address assigned to the specified BAR for this device. |
VI_ATTR_PXI_MEM_SIZE_BARn |
32-bit: (0x3FFF0231UL+ n) 64-bit: (0x3FFF0238UL+ n) |
Size of the memory assigned to the specified BAR for this device. |
VI_ATTR_PXI_CHASSIS | 0x3FFF0206UL | Chassis number in which this device is located. |
VI_ATTR_PXI_IS_EXPRESS | 0x3FFF0240UL | Specifies whether this device is PXI Express. |
VI_ATTR_PXI_SLOT_LWIDTH | 0x3FFF0241UL | Specifies the link width used by the slot in which this device is located. |
VI_ATTR_PXI_MAX_LWIDTH | 0x3FFF0242UL | Specifies the maximum link width that this device can use. |
VI_ATTR_PXI_ACTUAL_LWIDTH | 0x3FFF0243UL | Specifies the negotiated link width that this device is using. |
VI_ATTR_PXI_DSTAR_BUS | 0x3FFF0244UL | Number of the DSTAR bus connected to this device in the chassis. |
VI_ATTR_PXI_DSTAR_SET | 0x3FFF0245UL | Specifies the set of PXI_DSTAR lines connected to this device. |